package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IGuessingAndAwardFragmentModel;
import com.wgts.wgts.mvp.model.IJoinActionActivityModel;
import com.wgts.wgts.mvp.model.imp.GuessingAndAwardFragmentModel;
import com.wgts.wgts.mvp.model.imp.JoinActionActivityModel;
import com.wgts.wgts.mvp.presenter.IGuessingAndAwardFragmentPresenter;
import com.wgts.wgts.mvp.presenter.imp.GuessingAndAwardFragmentPresenter;
import com.wgts.wgts.mvp.view.IGuessingAndAwardFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/1311:55
 *
 */
@Module
public class GuessingAndAwardFragmentModule {
    private IGuessingAndAwardFragmentView view;

    public GuessingAndAwardFragmentModule(IGuessingAndAwardFragmentView view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public IGuessingAndAwardFragmentView provideView(){
        return view;
    }

    @FragmentScope
    @Provides
    public IGuessingAndAwardFragmentModel provideModel(NetService netService){
        return new GuessingAndAwardFragmentModel(netService);
    }

    @FragmentScope
    @Provides
    public IJoinActionActivityModel provideJoinActionActivityModel(NetService netService){
        return new JoinActionActivityModel(netService);
    }

    @FragmentScope
    @Provides
    public IGuessingAndAwardFragmentPresenter providePresenter(IGuessingAndAwardFragmentView view, IGuessingAndAwardFragmentModel model, IJoinActionActivityModel joinActionActivityModel){
        return new GuessingAndAwardFragmentPresenter(view, model, joinActionActivityModel);
    }
}
